package com.ruoyi.jiugongge.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jiugongge.mapper.JiugonggeMapper;
import com.ruoyi.jiugongge.domain.Jiugongge;
import com.ruoyi.jiugongge.service.IJiugonggeService;
import com.ruoyi.common.support.Convert;

/**
 * 九宫格活动 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-14
 */
@Service
public class JiugonggeServiceImpl implements IJiugonggeService 
{
	@Autowired
	private JiugonggeMapper jiugonggeMapper;

	/**
     * 查询九宫格活动信息
     * 
     * @param id 九宫格活动ID
     * @return 九宫格活动信息
     */
    @Override
	public Jiugongge selectJiugonggeById(String id)
	{
	    return jiugonggeMapper.selectJiugonggeById(id);
	}
	
	/**
     * 查询九宫格活动列表
     * 
     * @param jiugongge 九宫格活动信息
     * @return 九宫格活动集合
     */
	@Override
	public List<Jiugongge> selectJiugonggeList(Jiugongge jiugongge)
	{
	    return jiugonggeMapper.selectJiugonggeList(jiugongge);
	}
	
    /**
     * 新增九宫格活动
     * 
     * @param jiugongge 九宫格活动信息
     * @return 结果
     */
	@Override
	public int insertJiugongge(Jiugongge jiugongge)
	{
	    return jiugonggeMapper.insertJiugongge(jiugongge);
	}
	
	/**
     * 修改九宫格活动
     * 
     * @param jiugongge 九宫格活动信息
     * @return 结果
     */
	@Override
	public int updateJiugongge(Jiugongge jiugongge)
	{
	    return jiugonggeMapper.updateJiugongge(jiugongge);
	}

	/**
     * 删除九宫格活动对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteJiugonggeByIds(String ids)
	{
		return jiugonggeMapper.deleteJiugonggeByIds(Convert.toStrArray(ids));
	}

	@Override
	public Jiugongge selectJiugonggeByCode(String code) {
		// TODO Auto-generated method stub
		return jiugonggeMapper.selectJiugonggeByCode(code);
	}

	@Override
	public int doUpdateShortUrl(String id, String shortUrl) {
		// TODO Auto-generated method stub
		return jiugonggeMapper.doUpdateShortUrl(id,shortUrl);
	}
	
}